﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Tools;
using Wp.DAL;
using System.Data.SqlClient;
using System.Data;

namespace Wp.BLL
{
    /// <summary>
    /// Summary description for Per_ActionsRoles
    /// </summary>
    public class TblPhotoManager : TblPhotoManagerBase
    {
        public TblPhotoManager()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public static TblPhotoManager CreateInstant()
        {
            return new TblPhotoManager();
        }
        public List<TblPhotoEntity> SelectTblPhotoByAlbumTextId(string AlbumTextId)
        {
            SqlParameter[] commandParameters = new List<SqlParameter> { new SqlParameter("@AlbumTextId", AlbumTextId) }.ToArray();
            List<TblPhotoEntity> list2 = new List<TblPhotoEntity>();
            DataTable table = SqlHelper.ExecuteDataTable(SqlHelper.WpConnectString, CommandType.StoredProcedure, "wp_SelectTblPhotoByAlbumTextId", commandParameters);
            if ((table != null) && (table.Rows.Count > 0))
            {
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    list2.Add(base.GetTblPhotoEntity(table.Rows[i]));
                }
            }
            return list2;
        }
    }
}
